﻿using System;
using DDDNorthWind.Core.Message;

namespace DDDNorthWind.Core.Bus
{
    public interface IFluentBus<TMessage>
        where TMessage : IMessage
    {

        IFluentBusAsync<TMessage> AddCallback(Action<TMessage> action);

        IFluentBusAsync<TMessage> AsAsync();

        IFluentBus<TMessage> SetTimeOut(int miliseconds, Action onTimeOut = null);

        void Send();

    }
}